﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace dividedthreewithnoremainder
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("0-1000被3整除但不能被5整除的数：");
            int Add = 0;
            for (int i = 0; i <= 1000; i++)
            {
                if (i%3==0&&i%5!=0)
                {
                    Add++;
                    Console.WriteLine(i);
                }

            }
            Console.WriteLine("总个数为：{0}",Add);
            Console.ReadKey();
        }
    }
}
